getResult

inline suspend fun <T> HttpClient.getResult(urlString: String, noinline block: HttpRequestBuilder.() -> Unit = {}): Result<T>

Performs an HTTP GET request synchronously and returns the result as a Result of type T.

Return

Result representing the synchronous operation.

Parameters

urlString

The URL for the GET request.

block

Optional, allows customization of the request using HttpRequestBuilder.